package com.example.springboot.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.springboot.entity.RoutingEntity;
import com.example.springboot.entity.SubmenuEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@Schema(description = "父子路由关联返回参数")
public class RoleResp {

    @Schema(description = "序号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "权限名称")
    @TableField("label")
    private String label;

    @Schema(description = "权限等级")
    @TableField("power")
    private Integer power;

    @Schema(description = "书本限制")
    @TableField("limitBook")
    private Integer limitBook;

    @Schema(description = "时间限制")
    @TableField("limitDay")
    private Integer limitDay;

    @Schema(description = "状态")
    @TableField("state")
    private Integer state;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    @TableField("createTime")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    @TableField("updateTime")
    private Date updateTime;

    //@Schema(description = "权限路由关联")
    //private List<RoutingEntity> routingEntityList;

    @Schema(description = "一级路由")
    private List<SubmenuEntity> submenuEntityList;

}
